{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.5.0+35.ge26b05f\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import folium\n",
    "\n",
    "\n",
    "print(folium.__version__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZmxldC5hd2Vz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hcCIgaWQ9Im1hcF9mODk4NDg4NTdmYTM0OTVhYWFhNTg3ODkwMjViZWRlOSIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCgogICAgICAgICAgICAKICAgICAgICAgICAgICAgIHZhciBib3VuZHMgPSBudWxsOwogICAgICAgICAgICAKCiAgICAgICAgICAgIHZhciBtYXBfZjg5ODQ4ODU3ZmEzNDk1YWFhYTU4Nzg5MDI1YmVkZTkgPSBMLm1hcCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdtYXBfZjg5ODQ4ODU3ZmEzNDk1YWFhYTU4Nzg5MDI1YmVkZTknLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2NlbnRlcjogWzAsMF0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6b29tOiAxLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4Qm91bmRzOiBib3VuZHMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcnM6IFtdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd29ybGRDb3B5SnVtcDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl81OTFmODkxZmY3ZWI0YWQ0YmRiNmU4YjIwMmI0OTA4NCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICAgICAgICAgIHsKICAiYXR0cmlidXRpb24iOiBudWxsLAogICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwKICAibWF4Wm9vbSI6IDE4LAogICJtaW5ab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vZyhjb29yZHMpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgIGRyYXduSXRlbXMuYWRkTGF5ZXIobGF5ZXIpOwogICAgICAgICAgICAgfSk7CgogICAgICAgIG1hcF9mODk4NDg4NTdmYTM0OTVhYWFhNTg3ODkwMjViZWRlOS5vbignZHJhdzpjcmVhdGVkJywgZnVuY3Rpb24oZSkgewogICAgICAgICAgICBkcmF3bkl0ZW1zLmFkZExheWVyKGUubGF5ZXIpOwogICAgICAgIH0pOwoKICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZXhwb3J0Jykub25jbGljayA9IGZ1bmN0aW9uKGUpIHsKICAgICAgICAgICAgdmFyIGRhdGEgPSBkcmF3bkl0ZW1zLnRvR2VvSlNPTigpOwogICAgICAgICAgICB2YXIgY29udmVydGVkRGF0YSA9ICd0ZXh0L2pzb247Y2hhcnNldD11dGYtOCwnICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KGRhdGEpKTsKICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2V4cG9ydCcpLnNldEF0dHJpYnV0ZSgnaHJlZicsICdkYXRhOicgKyBjb252ZXJ0ZWREYXRhKTsKICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2V4cG9ydCcpLnNldEF0dHJpYnV0ZSgnZG93bmxvYWQnLCdkYXRhLmdlb2pzb24nKTsKICAgICAgICB9CiAgICAgICAgICAgIAo8L3NjcmlwdD4=\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f7ce8c7cc88>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from folium.plugins import Draw\n",
    "\n",
    "m = folium.Map()\n",
    "\n",
    "draw = Draw()\n",
    "\n",
    "draw.add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Draw0.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZmxldC5hd2Vzb21lLW1hcmtlcnMuanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2Nkbi5qc2Rl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AgIAogICAgICAgICAgICA8c3R5bGU+ICNtYXBfMmExZjVjMjA5ZjEyNDZkNjk5NWU2NTJjOTY4MWNkMGIgewogICAgICAgICAgICAgICAgcG9zaXRpb24gOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgIHdpZHRoIDogMTAwLjAlOwogICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAuMCU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLnJhd2dpdC5jb20vTGVhZmxldC9MZWFmbGV0LmRyYXcvdjAuNC4xMi9kaXN0L2xlYWZsZXQuZHJhdy5qcyI+PC9zY3JpcHQ+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vY2RuLnJhd2dpdC5jb20vTGVhZmxldC9MZWFmbGV0LmRyYXcvdjAuNC4xMi9kaXN0L2xlYWZsZXQuZHJhdy5jc3MiIC8+CiAgICA8c3R5bGU+CiAgICAgICAgI2V4cG9ydCB7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIHRvcDogNXB4OwogICAgICAgIHJpZ2h0OiAxMHB4OwogICAgICAgIHotaW5kZXg6IDk5OTsKICAgICAgICBiYWNrZ3JvdW5kOiB3aGl0ZTsKICAgICAgICBjb2xvcjogYmxhY2s7CiAgICAgICAgcGFkZGluZzogNnB4OwogICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDsKICAgICAgICBmb250LWZhbWlseTogJ0hlbHZldGljYSBOZXVlJzsKICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTsKICAgICAgICB0b3A6IDkwcHg7CiAgICAgICAgfQogICAgICAgIDwvc3R5bGU+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG4ucmF3Z2l0LmNvbS9MZWFmbGV0L0xlYWZsZXQuZHJhdy92MC40LjEyL2Rpc3QvbGVhZmxldC5kcmF3LmpzIj48L3NjcmlwdD4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9jZG4ucmF3Z2l0LmNvbS9MZWFmbGV0L0xlYWZsZXQuZHJhdy92MC40LjEyL2Rpc3QvbGVhZmxldC5kcmF3LmNzcyIgLz4KPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF8yYTFmNWMyMDlmMTI0NmQ2OTk1ZTY1MmM5NjgxY2QwYiIgPjwvZGl2PgogICAgICAgIAogICAgPGEgaHJlZj0nIycgaWQ9J2V4cG9ydCc+RXhwb3J0PC9hPgo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCgogICAgICAgICAgICAKICAgICAgICAgICAgICAgIHZhciBib3VuZHMgPSBudWxsOwogICAgICAgICAgICAKCiAgICAgICAgICAgIHZhciBtYXBfMmExZjVjMjA5ZjEyNDZkNjk5NWU2NTJjOTY4MWNkMGIgPSBMLm1hcCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdtYXBfMmExZjVjMjA5ZjEyNDZkNjk5NWU2NTJjOTY4MWNkMGInLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2NlbnRlcjogWy0yNy4yMywtNDguMzZdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbTogMTIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IGJvdW5kcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyczogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyX2Q4NTllOWE5MDI5YjQ0NDI5OGQwMTk5ZjVkYjdlNjM3ID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgICAgICAgICAgewogICJhdHRyaWJ1dGlvbiI6IG51bGwsCiAgImRldGVjdFJldGluYSI6IGZhbHNlLAogICJtYXhab29tIjogMTgsCiAgIm1pblpvb20iOiAxLAogICJub1dyYXAiOiBmYWxzZSwKICAic3ViZG9tYWlucyI6ICJhYmMiCn0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwXzJhMWY1YzIwOWYxMjQ2ZDY5OTVlNjUyYzk2ODFjZDBiKTsKICAgICAgICAKICAgIAogICAgICAgICAgICAvLyBGZWF0dXJlR3JvdXAgaXMgdG8gc3RvcmUgZWRpdGFibGUgbGF5ZXJzLgogICAgICAgICAgICB2YXIgZHJhd25JdGVtcyA9IG5ldyBMLmZlYXR1cmVHcm91cCgpLmFkZFRvKG1hcF8yYTFmNWMyMDlmMTI0NmQ2OTk1ZTY1MmM5NjgxY2QwYik7CiAgICAgICAgICAgIHZhciBkcmF3X2NvbnRyb2xfODcyMmNmZTIzMjYxNGMyNDljYjFlMDRiMGQ0NTQ3ZTEgPSBuZXcgTC5Db250cm9sLkRyYXcoewogICAgICAgICAgICAgICAgImVkaXQiOiB7ImZlYXR1cmVHcm91cCI6IGRyYXduSXRlbXN9CiAgICAgICAgICAgICAgICB9KS5hZGRUbyhtYXBfMmExZjVjMjA5ZjEyNDZkNjk5NWU2NTJjOTY4MWNkMGIpCiAgICAgICAgICAgIG1hcF8yYTFmNWMyMDlmMTI0NmQ2OTk1ZTY1MmM5NjgxY2QwYi5vbihMLkRyYXcuRXZlbnQuQ1JFQVRFRCwgZnVuY3Rpb24gKGV2ZW50KSB7CiAgICAgICAgICAgICAgdmFyIGxheWVyID0gZXZlbnQubGF5ZXIsCiAgICAgICAgICAgICAgICAgIHR5cGUgPSBldmVudC5sYXllclR5cGUsCiAgICAgICAgICAgICAgICAgIGNvb3JkczsKICAgICAgICAgICAgICB2YXIgY29vcmRzID0gSlNPTi5zdHJpbmdpZnkobGF5ZXIudG9HZW9KU09OKCkpOwogICAgICAgICAgICAgIGxheWVyLm9uKCdjbGljaycsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgYWxlcnQoY29vcmRzKTsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNvb3Jkcyk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgZHJhd25JdGVtcy5hZGRMYXllcihsYXllcik7CiAgICAgICAgICAgICB9KTsKCiAgICAgICAgbWFwXzJhMWY1YzIwOWYxMjQ2ZDY5OTVlNjUyYzk2ODFjZDBiLm9uKCdkcmF3OmNyZWF0ZWQnLCBmdW5jdGlvbihlKSB7CiAgICAgICAgICAgIGRyYXduSXRlbXMuYWRkTGF5ZXIoZS5sYXllcik7CiAgICAgICAgfSk7CgogICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdleHBvcnQnKS5vbmNsaWNrID0gZnVuY3Rpb24oZSkgewogICAgICAgICAgICB2YXIgZGF0YSA9IGRyYXduSXRlbXMudG9HZW9KU09OKCk7CiAgICAgICAgICAgIHZhciBjb252ZXJ0ZWREYXRhID0gJ3RleHQvanNvbjtjaGFyc2V0PXV0Zi04LCcgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoZGF0YSkpOwogICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZXhwb3J0Jykuc2V0QXR0cmlidXRlKCdocmVmJywgJ2RhdGE6JyArIGNvbnZlcnRlZERhdGEpOwogICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZXhwb3J0Jykuc2V0QXR0cmlidXRlKCdkb3dubG9hZCcsJ2RhdGEuZ2VvanNvbicpOwogICAgICAgIH0KICAgICAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f7ce8cc9c88>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[-27.23, -48.36], zoom_start=12)\n",
    "\n",
    "draw = Draw(export=True)\n",
    "\n",
    "draw.add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Draw1.html'))\n",
    "\n",
    "m"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
